package com.ugrow.Study_System.activity;

import android.graphics.drawable.AnimationDrawable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.ugrow.Study_System.R;

public class FrameAnimActivity extends AppCompatActivity {

    private ImageView iv;
    private AnimationDrawable ad;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_frameanim);
        iv = (ImageView) findViewById(R.id.act_frame_wifi_iv);
    }

    public void Wifi_Btn(View view) {
        ad = (AnimationDrawable) iv.getDrawable();
        if (!ad.isRunning()) {

            ad.start();
        }else{
            ad.stop();
        }
    }
}
